home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / appkit / NXImageRep.h < prev    next >
Text File  |  1992-01-15  |  2KB  |  76 lines

  1. /*
  2.     NXImageRep.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <objc/Object.h>
  8. #import "Pasteboard.h"
  9. #import "graphics.h"
  10.  
  11. /*
  12.  * NX_MATCHESDEVICE indicates the value is variable, depending on the output
  13.  * device. It can be the passed in (or received back) as the value of 
  14.  * numColors, bitsPerSample, or pixelsWide & pixelsHigh.
  15.  */
  16.  
  17. #define NX_MATCHESDEVICE    (0)
  18.  
  19. /*
  20.  * Names of segments for EPS and TIFF files and app & document icons.
  21.  */
  22.  
  23. #define NX_EPSSEGMENT "__EPS"
  24. #define NX_TIFFSEGMENT "__TIFF"
  25. #define NX_ICONSEGMENT "__ICON"
  26.  
  27. @interface NXImageRep : Object
  28. {
  29.     struct __repFlags {
  30.     unsigned int hasAlpha:1;
  31.     unsigned int numColors:3;
  32.     unsigned int bitsPerSample:6;
  33.     unsigned int dataSource:3;
  34.     unsigned int dataLoaded:1;
  35.     unsigned int isOpaque:1;
  36.     unsigned int :0;
  37.     }                   _repFlags;
  38.     NXSize              size;
  39.     int                 _pixelsWide;
  40.     int                 _pixelsHigh;
  41.     int                 _gsaved;
  42. }
  43.  
  44. - (BOOL)drawAt:(const NXPoint *)point;
  45. - (BOOL)drawIn:(const NXRect *)rect;
  46. - (BOOL)draw;
  47. - setSize:(const NXSize *)aSize;
  48. - getSize:(NXSize *)aSize;
  49. - setAlpha:(BOOL)flag;
  50. - (BOOL)hasAlpha;
  51. - setOpaque:(BOOL)flag;
  52. - (BOOL)isOpaque;
  53. - setNumColors:(int)anInt;
  54. - (int)numColors;
  55. - setBitsPerSample:(int)anInt;
  56. - (int)bitsPerSample;
  57. - setPixelsWide:(int)anInt;
  58. - (int)pixelsWide;
  59. - setPixelsHigh:(int)anInt;
  60. - (int)pixelsHigh;
  61. - read:(NXTypedStream *)stream;
  62. - write:(NXTypedStream *)stream;
  63.  
  64. + (const char *const *)imageUnfilteredFileTypes;
  65. + (const char *const *)imageFileTypes;
  66. + (const NXAtom *)imageUnfilteredPasteboardTypes;
  67. + (const NXAtom *)imagePasteboardTypes;
  68. + (BOOL)canLoadFromStream:(NXStream *)stream;
  69.  
  70. + (BOOL)canInitFromPasteboard:(Pasteboard *)pasteboard;
  71. - initFromPasteboard:(Pasteboard *)pasteboard;
  72.  
  73. @end
  74.  
  75.  
  76.